Junction diodes are important devices in electronic circuits for rectification, switching and protection. They are often formed using element semiconductors such as Si, Ge and compound semiconductors such as GaAs and InP. For efficient rectification or switching, the charge carrier mobility and breakdown electric filed of the materials used should be sufficiently high. The unwanted series resistances in ON state should be low so that the energy loss in the diodes is kept low during operation. The present invention provides structures of diodes based on metal oxynitride semiconductor.